package hngc.com;

import java.util.Scanner;

public class Box18 {
    public static void main(String[] args) {
        int a=0;
        int b=0;
        int c=0;
        Scanner scanner=new Scanner(System.in);
        System.out.println("输入a值");
        while (scanner.hasNext()){
            try {
                a=scanner.nextInt();
                System.out.println("输入b值");
                b=scanner.nextInt();
                System.out.println("输入c值");
                c=scanner.nextInt();
                break;
            }catch (Exception e){
                System.out.println("输入不符合规则");
                return;
            }
        }
        if((1<=a&&a<=10)&&(1<=b&&b<=10)&&(1<=c&&c<=10)){
            if(a+b>c&&a+c>b&&b+c>a){//组成三角形的前题条件，任意两边之和大于第三边
                if ((a==b&&b==c)){
                    System.out.println("能组成等边三角形");
                }else if(a==b||a==c||b==c){
                    System.out.println("能组成等腰三角行");
                }else {
                    System.out.println("能组成普通三角形");
                }
            } else{
                System.out.println("输入边值不能组成三角形");
            }
        }else{
            System.out.println("输入边值不在范围内，请重新输入");
        }
        scanner.close();
    }
}
